<#ftl/>
package ${mapperPackage};

import ${entityPackage}.${entity};
<#if need_saveDto>
import ${voPackage}.${voClassName};
</#if>
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
<#if mapperPlus>
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
</#if>

/**
 * <p>
 * ${table.comment!} Mapper 接口
 * </p>
 * @author ${author}
 * @since ${date}
 */
<#if mapperPlus>
<#else>
@Mapper</#if>
public interface ${mapperClassName}  <#if mapperPlus>extends BaseMapper<${entity}></#if>{
<#if need_saveDto>
    /**
    * 查询列表
    */
    List<${voClassName}> query(${entity} query);
<#else>
    /**
    * 查询列表
    */
    List<${entity}> query(${entity} query);
</#if>
<#if mapperPlus>

<#else>
  /**
  * 查询
  */
   ${entity} select${entity}ByPrimaryKey(<#list table.fields as field><#if field.keyFlag><#--主键java类型-->@Param("pk")${field.columnType.type} ${field.propertyName}</#if></#list>);

  
  /**
  * 新增
  */
   int insert${entity}(${entity} ${classVar});
  
  /**
  * 修改
  */
   int update${entity}(${entity} ${classVar});
  
  /**
  * 删除
  */
   int delete${entity}ByPrimaryKey(<#list table.fields as field><#if field.keyFlag><#--主键java类型-->@Param("pk")${field.columnType.type} ${field.propertyName}</#if></#list>);
  
  /**
  * 批量删除
  */
   int batchDelete${entity}ByPrimaryKeys(<#list table.fields as field><#if field.keyFlag><#--主键java类型-->@Param("pks")${field.columnType.type}[] ids</#if></#list>);

</#if>
}
